﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    // Description: Calculates the distance between two points
    /*
        ' Triangle of pythagoras a^2=b^2+c^2
        Dim ptA As New Point(3, 4)
        Dim ptB As New Point(5, 6)
        MsgBox(ptA.DistanceToPoint(ptB))
     */

    public static partial class ColorExtensions
    {
        public static double DistanceToPoint(Point PointA, Point PointB)
        {
            return Math.Sqrt(Math.Pow((PointA.X - PointB.X), 2) + Math.Pow((PointA.Y - PointB.Y), 2));
        }
    }
}
